package com.mobialia.trivial.es;

import java.util.HashMap;
import java.util.Map;

import android.content.Context;
import android.location.Location;

import com.google.ads.AdRequest;
import com.google.ads.AdView;

public class MyAdManager {

	private static AdRequest adRequest;
   
	static {
		adRequest = new AdRequest();
	}

	static void initialize(Context ctx) {
		Map<String, Object> extras = new HashMap<String, Object>();
		String colorbg = "000000";
		String colorfg = "ffffff";
		extras.put("color_bg", colorbg);
		extras.put("color_bg_top", colorbg);
		extras.put("color_border", colorbg);
		extras.put("color_link", colorfg);
		extras.put("color_text", colorfg);
		extras.put("color_url", colorfg);

		adRequest.setExtras(extras);
	}
	
	static void setLocation(Location location) {
		adRequest.setLocation(location);
	}
	
	static void loadAd(AdView adView) {
		adView.loadAd(adRequest);
	}
}
